/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package business;

import data.Grouptable;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author stana
 */
@Stateless
public class GrouptableFacade extends AbstractFacade<Grouptable> {
    @PersistenceContext(unitName = "SmsWeatherPU")
    private EntityManager em;

    protected EntityManager getEntityManager()
    {
        return em;
    }

    public GrouptableFacade()
    {
        super(Grouptable.class);
    }

    public List<Grouptable> findByID(String userID)
    {
        return em.createNamedQuery("Grouptable.findByUserid").setParameter("userid",userID).getResultList();
    }

}
